/*
 * Created by: Peter Weissbrod
 * Created: Saturday, November 03, 2007
 */
using Castle.ActiveRecord;
using NUnit.Framework;

namespace EntityLayer
{
    /// <summary>
    /// this class encapsulates scripts for building and destroying a database.
    /// make sure you run them ONE AT A TIME
    /// </summary>
    [TestFixture]
    public class DatabaseSetup
    {
        /// <summary>
        /// this will delete all of the data from all tables
        /// </summary>
        [Test]
        public void ClearAllData()
        {
            ActiveRecordStarter.Initialize();
            ActiveRecordStarter.DropSchema();
            ActiveRecordStarter.CreateSchema();
        }
        /// <summary>
        /// running this will build a database schema from the ground up
        /// </summary>
        [Test]
        public void CreateEmptyDatabase()
        {
            ActiveRecordStarter.Initialize();
            ActiveRecordStarter.CreateSchema();
        }
        //this method will blow away the database schema
        [Test]
        public void RemoveSchema()
        {
            ActiveRecordStarter.Initialize();
            ActiveRecordStarter.DropSchema();
        }
    }
}